package com.itheima.sh.a_opp_test_01;

public class Test01 {
    public static void main(String[] args) {
        //1.创建数组存储电影类对象 数据类型[] 数组名=new
        // 数据类型[]{}; 数据类型[] 数组名=new 数据类型[数组长度];
        Movie[] movies = new Movie[5];//movies表示数组名 Movie 表示自定义的数据类型
        //2.创建Movie类对象
        Movie m1 = new Movie(1, "出拳吧，妈妈", 50, 7.9, "唐晓白", "谭卓,田雨", "20.9万人想看");
        Movie m2 = new Movie(2, "水门桥", 38.9, 9.8, "徐克", "吴京", "12万人想看");
        Movie m3 = new Movie(3, "Hong kong dall 大战黑马强哥", 999, 10.0, "强哥", "玩偶姐姐", "999.9万人想看");
        Movie m4 = new Movie(4, "月球陨落", 42, 7.9, "罗兰", "贝瑞", "17.9万人想看");
        Movie m5 = new Movie(5, "一点就到家", 35, 8.7, "许宏宇", "刘昊然", "10.8万人想看");
        //3.将上述五个电影对象存入到数组中
        movies[0] = m1;
        movies[1] = m2;
        movies[2] = m3;
        movies[3] = m4;
        movies[4] = m5;
        //4.创建电影操作类MovieOperator对象，将上述数组movies作为参数传递
        MovieOperator operator=new MovieOperator(movies);
        //5.使用operator对象调用start方法
        operator.start();
    }
}
